home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 376-400 / disk_378 / adapt / adapt.doc < prev    next >
Text File  |  1992-05-06  |  5KB  |  125 lines

  1. ******************************************************************************
  2.  
  3.                                     ADAPT
  4.                    Version 2.2 by Lars Eggert in March 1990
  5.  
  6. ******************************************************************************
  7.  
  8.  
  9.  
  10.  
  11.                               About the program
  12.                               -----------------
  13.  
  14. Ever had the problem that you had to use files stored on MS-DOS files with
  15. your Amiga?  You may have used CrossDOS or Dos2Dos to copy them to your Amiga
  16. disks.  This may solve the problem if you live in Britain or in the USA, but
  17. not if you live in a country like Germany or France.  If your language
  18. contains special characters (the German ´umlauts´ äöüÄÖÜß for example) most
  19. likely they are not transformed correctly by the programs I mentioned above.
  20. This is where Adapt helps you.  It reads a file and changes the MS-DOS codes
  21. for the ´special characters´ to Amiga codes.
  22.  
  23. This version of Adapt can only handle German ´umlauts´ (simply because I am
  24. German).  Please feel free to change the source of Adapt so that it works with
  25. your language.  It is easy to do this, even if you are not an experienced
  26. programmer.  I will explain somewhere below how to do this.
  27.  
  28. Another feature of Adapt ist that it will convert any TAB´s to spaces, if you
  29. want it to.  This may be useful if you want to work with ´C´ source codes from
  30. MS-DOS on your Amiga.  For example, a friend of mine uses TAB sizes of eight
  31. characters in his MS-DOS sources.  If I would use them with my editor without
  32. converting them I would get problems, because I use a TAB size of two.
  33.  
  34.  
  35.  
  36.  
  37.  
  38.                             How to use the Program
  39.                             ----------------------
  40.  
  41. ADAPT <source> <destination> [n]
  42.  
  43. Parameters: <source>      Source file, the file we want to convert.
  44.             <destination> Destination file, here we want to store the
  45.                           converted text.
  46.             [n]           Number of spaces one TAB will have after converting.
  47.                           This parameter is optional, if you leave it empty,
  48.                           Adapt will not touch the TAB´s in your text.
  49.  
  50. NOTE: The processing of large files may take some time, although I tried to
  51.       make Adapt as fast as possible. Be patient!
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.              How to change the source to work with your language
  59.              ---------------------------------------------------
  60.  
  61. You will find this piece of code somewhere in the source:
  62.  
  63.         switch(*from)
  64.           {
  65.           case 132: *(to++) = 'ä'; break;
  66.           case 148: *(to++) = 'ö'; break;
  67.           case 129: *(to++) = 'ü'; break;
  68.                         .
  69.                         .
  70.                         .
  71.          default:  *to++ = *from; break;
  72.           }
  73.  
  74. This is where we tell the program how to react on certain characters.  Let´s
  75. look at the first line:
  76.  
  77.           case 132: *(to++) = 'ä'; break;
  78.  
  79. It says:  "If you find a character with a code of 132 in the source, then
  80. change it to an ´ä´ in the destination file."
  81.  
  82. The code of 132 is a MS-DOS ´ä´.  If you want to change the program to work,
  83. for example, with the ´è´ of the French language, you will have to look in the
  84. documentation of your PC what code the ´è´ has.  Let´s say this code is XYZ.
  85. You will have to modify the program line so it looks like the following:
  86.  
  87.           case XYZ: *(to++) = 'è'; break;
  88.  
  89. The general form of the line is:
  90.  
  91.           case [MS-DOS CODE]: *(to++) = '[AMIGA CHARACTER]'; break;
  92.  
  93. Hope you understood my little explanation.
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100. ******************************************************************************
  101.  
  102. ADAPT is Public Domain.  You may copy, swap or modify it as you like.  Note
  103. that you use this program at your own risk.  I will not be liable for any
  104. damage the usage of this program might do to your data.  (It never did any
  105. damage to my own files, but heaven knows...)
  106.  
  107. I would like to get comments and suggestions on how to improve the program.
  108. If you have improved it already, I would appreciate if you would send me a
  109. disk with your latest version.
  110.  
  111.                                  Lars Eggert
  112.                                Im Flutgraben 23
  113.                              6337 Leun-Bissenberg
  114.                                  West Germany
  115.                              Phone:  06473 / 1695
  116.  
  117. Hey, if you like to, you can send me some of your programs.  But please do not
  118. send any pirated software.  I will use your disk for harddisk backups then.
  119.  
  120. ******************************************************************************
  121.  
  122.  
  123.  
  124.  
  125.